package com.swyc.osschat.Test.designMode.status.impl;

import com.swyc.osschat.Test.designMode.status.base.State;

/**
 * @description 具体状态角色：中等
 * @Author: z156940l@outlook.com
 * @className MiddleState
 * @Date: 2022/7/21 16:44
 */
public class MiddleState extends State {

    public MiddleState(State state) {
        this.context = state.context;
        stateName = "中等";
    }

    @Override
    public void checkState(int score) {
        if (score < 60) {
            context.setState(new LowState(this));
        } else if (score >= 90) {
            context.setState(new HightState(this));
        }
    }
}
